// Package Frame /*
package Frame

type BaseFrame interface {
	Key() string
	Handle() *BaseFrame
}

func GetFrameList() []BaseFrame {
	return []BaseFrame{
		&Logger{},
		&DatabasePool{},
		&RedisPool{},
		&Context{},
	}
}

type DefaultConfig interface {
	GetConfigKey() string
	GetConfigValue() map[string]map[string]string
}

func ApplicationStart(defaultConfig []DefaultConfig) *Container {
	frameContainer = CreateContainer()

	config := &Config{}

	frameContainer.Set(config.Key(), config.Handle())

	for _, item := range defaultConfig {
		key := item.GetConfigKey()

		val := item.GetConfigValue()

		config.SetBaseConfigMap(key, val)
	}

	for _, frame := range GetFrameList() {
		obj := frame

		frameContainer.Set(obj.Key(), obj.Handle())
	}

	return frameContainer
}
